package com.bit.aop.reflect;

import java.lang.reflect.Method;

public class Main {
    public static void main(String[] args) throws Exception {
        Class<?> clazz = Class.forName("com.bit.aop.reflect.Person");
        Object o = clazz.getDeclaredConstructor().newInstance();
        System.out.println(o);

        Method method = clazz.getDeclaredMethod("print", Integer.class);
        method.setAccessible(true);
        method.invoke(o, 5);
    }
}
